Skip to content

Commit

Permalink
use proper crontab config
Browse files Browse the repository at this point in the history
  • Loading branch information
prettyirrelevant committed Aug 29, 2023
1 parent c9f25bc commit ea3ea4f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions backend/bridgebloc/apps/conversions/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
logger = logging.getLogger(__name__)


@db_periodic_task(crontab(minute=1))
@db_periodic_task(crontab(minute='*/1'))
@lock_task('poll-circle-for-deposit-addresses-lock')
def poll_circle_for_deposit_addresses() -> None:
logger.info('Starting Circle API deposit addresses polling...')
Expand Down Expand Up @@ -69,7 +69,7 @@ def poll_circle_for_deposit_addresses() -> None:
logger.info('Circle API deposit address polling completed.')


@db_periodic_task(crontab(minute=3))
@db_periodic_task(crontab(minute='*/2'))
@lock_task('check-for-circle-api-deposit-confirmation')
def check_for_circle_api_deposit_confirmation() -> None:
logger.info('Starting Circle API deposit confirmation checks...')
Expand Down Expand Up @@ -124,7 +124,7 @@ def check_for_circle_api_deposit_confirmation() -> None:
logger.info('Circle API deposit confirmation check completed.')


@db_periodic_task(crontab(minute=1))
@db_periodic_task(crontab(minute='*/1'))
@lock_task('send-to-recipient-using-circle-api-lock')
def send_to_recipient_using_circle_api() -> None:
logger.info('Starting Circle API withdrawal process for recipients...')
Expand Down Expand Up @@ -159,7 +159,7 @@ def send_to_recipient_using_circle_api() -> None:
logger.info('Circle API withdrawal process completed successfully.')


@db_periodic_task(crontab(minute=3))
@db_periodic_task(crontab(minute='*/2'))
@lock_task('wait-for-minimum-confirmation-for-circle-api-withdrawals-lock')
def wait_for_minimum_confirmation_for_circle_api_withdrawals() -> None:
logger.info('Starting withdrawal confirmation check for Circle API withdrawals...')
Expand Down Expand Up @@ -198,7 +198,7 @@ def wait_for_minimum_confirmation_for_circle_api_withdrawals() -> None:
logger.info('Withdrawals confirmation check completed.')


@db_periodic_task(crontab(minute=2))
@db_periodic_task(crontab(minute='*/2'))
@lock_task('check-for-cctp-attestation-confirmation-lock')
def check_for_cctp_attestation_confirmation() -> None:
steps_waiting_for_attestation_confirmation = TokenConversionStep.objects.select_related('conversion').filter(
Expand Down Expand Up @@ -233,7 +233,7 @@ def check_for_cctp_attestation_confirmation() -> None:
continue


@db_periodic_task(crontab(minute=5))
@db_periodic_task(crontab(minute='*/5'))
@lock_task('cctp-send-token-to-recipient-lock')
def cctp_send_token_to_recipient() -> None:
recipient_credit_steps = TokenConversionStep.objects.select_related('conversion__destination_token').filter(
Expand Down Expand Up @@ -278,7 +278,7 @@ def cctp_send_token_to_recipient() -> None:
continue


@db_periodic_task(crontab(minute=3))
@db_periodic_task(crontab(minute='*/2'))
@lock_task('get-lxly-merkle-proofs-lock')
def get_lxly_merkle_proofs() -> None:
steps_requiring_merkle_proofs = TokenConversionStep.objects.select_related('conversion__destination_token').filter(
Expand Down Expand Up @@ -316,7 +316,7 @@ def get_lxly_merkle_proofs() -> None:
continue


@db_periodic_task(crontab(minute=3))
@db_periodic_task(crontab(minute='*/1'))
@lock_task('claim-assets-at-destination-lxly-lock')
def claim_assets_at_destination_lxly() -> None:
claim_assets_steps = TokenConversionStep.objects.select_related('conversion__destination_token').filter(
Expand Down

0 comments on commit ea3ea4f

Please sign in to comment.