mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-19 14:09:20 -04:00
disable cache until we can fix on cloud deployment
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from app.extensions import redis_client
|
||||
from app.notify_client import NotifyAdminAPIClient, _attach_current_user, cache
|
||||
from flask import current_app
|
||||
|
||||
|
||||
class JobApiClient(NotifyAdminAPIClient):
|
||||
@@ -100,11 +101,12 @@ class JobApiClient(NotifyAdminAPIClient):
|
||||
data = _attach_current_user(data)
|
||||
job = self.post(url='/service/{}/job'.format(service_id), data=data)
|
||||
|
||||
redis_client.set(
|
||||
'has_jobs-{}'.format(service_id),
|
||||
b'true',
|
||||
ex=int(cache.DEFAULT_TTL),
|
||||
)
|
||||
if current_app.config['NOTIFY_ADMIN_API_CACHE_ENABLED']:
|
||||
redis_client.set(
|
||||
'has_jobs-{}'.format(service_id),
|
||||
b'true',
|
||||
ex=int(cache.DEFAULT_TTL),
|
||||
)
|
||||
|
||||
return job
|
||||
|
||||
|
||||
Reference in New Issue
Block a user