Skip to content

Commit

Permalink
Merge pull request #1716 from Giveth/add-email-to-project-in-adminjs
Browse files Browse the repository at this point in the history
add email to project in adminjs
  • Loading branch information
RamRamez authored Jul 23, 2024
2 parents 937ad72 + db09258 commit 093564f
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion config/example.env
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ ENABLE_UPDATE_RECURRING_DONATION_STREAM=true
NUMBER_OF_UPDATE_RECURRING_DONATION_CONCURRENT_JOB=1

# Default value is 0 0 * * * that means one day at 00:00
UPDATE_RECURRING_DONATIONS_STREAM=0 0 * * *
UPDATE_RECURRING_DONATIONS_STREAM_CRONJOB=0 0 * * *

# Default value is 0.4
PROJECT_SEARCH_SIMILARITY_THRESHOLD=0.4
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "giveth-graphql-api",
"version": "1.24.0",
"version": "1.24.1",
"description": "Backend GraphQL server for Giveth originally forked from Topia",
"main": "./dist/index.js",
"dependencies": {
Expand Down
1 change: 0 additions & 1 deletion src/server/adminJs/tabs/projectsTab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,6 @@ export const projectsTab = {
},
},
adminUserId: {
type: 'Number',
isVisible: {
list: true,
filter: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import {
} from '../recurringDonationStreamQueue';

const cronJobTime =
(config.get('UPDATE_RECURRING_DONATIONS_STREAM') as string) || '0 0 * * *'; // one day at 00:00
(config.get('UPDATE_RECURRING_DONATIONS_STREAM_CRONJOB') as string) ||
'0 0 * * *'; // one day at 00:00

export const runUpdateRecurringDonationStream = () => {
logger.debug(
Expand Down
16 changes: 11 additions & 5 deletions src/services/recurringDonationStreamQueue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,20 @@ setInterval(async () => {
}, TWO_MINUTES);

export const updateRecurringDonationsStream = async () => {
logger.debug('addJobToQueue() has been called');
logger.debug('updateRecurringDonationsStream Job Queue has been called');

const recurringDonations = await findActiveRecurringDonations();
logger.debug('Active recurring donations length', recurringDonations.length);
logger.debug(
'updateRecurringDonationsStream-Active recurring donations length',
recurringDonations.length,
);
recurringDonations.forEach(recurringDonation => {
logger.debug('Add pending recurringDonation to queue', {
recurringDonationId: recurringDonation.id,
});
logger.debug(
'updateRecurringDonationsStream-Add pending recurringDonation to queue',
{
recurringDonationId: recurringDonation.id,
},
);
updateRecurringDonationsStreamQueue.add(
{
recurringDonationId: recurringDonation.id,
Expand Down

0 comments on commit 093564f

Please sign in to comment.