@ -356,7 +356,7 @@ class _PostgresConsumer(Consumer):
|
||||
if not self.notifies:
|
||||
self._poll_for_notify()
|
||||
|
||||
if not self.notifies and not randint(0, 300):
|
||||
if not self.notifies and not randint(0, 300): # nosec
|
||||
# If there aren't any more notifies, randomly poll for missed/crashed messages.
|
||||
# Since this method is called every second, this condition limits polling to
|
||||
# on average one SELECT every five minutes of inactivity.
|
||||
@ -393,7 +393,7 @@ class _PostgresConsumer(Consumer):
|
||||
def _auto_purge(self):
|
||||
# Automatically purge messages on average every 100k iteration.
|
||||
# Dramatiq defaults to 1s, so this means one purge every 28 hours.
|
||||
if randint(0, 100_000):
|
||||
if randint(0, 100_000): # nosec
|
||||
return
|
||||
self.logger.debug("Running garbage collector")
|
||||
count = self.query_set.filter(
|
||||
|
@ -68,7 +68,7 @@ class Command(BaseCommand):
|
||||
*tasks_modules,
|
||||
]
|
||||
|
||||
os.execvp(executable_path, process_args)
|
||||
os.execvp(executable_path, process_args) # nosec
|
||||
|
||||
def _resolve_executable(self, exec_name: str):
|
||||
bin_dir = os.path.dirname(sys.executable)
|
||||
|
@ -1,4 +1,4 @@
|
||||
import pickle
|
||||
import pickle # nosec
|
||||
|
||||
import pglock
|
||||
from django.db import router, transaction
|
||||
@ -26,8 +26,8 @@ class Scheduler:
|
||||
|
||||
actor = self.broker.get_actor(schedule.actor_name)
|
||||
actor.send_with_options(
|
||||
args=pickle.loads(schedule.args),
|
||||
kwargs=pickle.loads(schedule.kwargs),
|
||||
args=pickle.loads(schedule.args), # nosec
|
||||
kwargs=pickle.loads(schedule.kwargs), # nosec
|
||||
options={
|
||||
"schedule_uid": schedule.uid,
|
||||
},
|
||||
|
Reference in New Issue
Block a user