Merge remote-tracking branch 'origin/master' into pullinprivate
Conflicts: workers/dockerfilebuild.py
This commit is contained in:
commit
d67a1cddc2
14 changed files with 96 additions and 32 deletions
|
@ -1,6 +1,8 @@
|
|||
import redis
|
||||
import json
|
||||
|
||||
class BuildStatusRetrievalError(Exception):
|
||||
pass
|
||||
|
||||
class BuildLogs(object):
|
||||
ERROR = 'error'
|
||||
|
@ -45,7 +47,7 @@ class BuildLogs(object):
|
|||
log_entries = self._redis.lrange(self._logs_key(build_id), start_index, -1)
|
||||
return (llen, (json.loads(entry) for entry in log_entries))
|
||||
except redis.ConnectionError:
|
||||
return (0, [])
|
||||
raise BuildStatusRetrievalError('Cannot retrieve build logs')
|
||||
|
||||
@staticmethod
|
||||
def _status_key(build_id):
|
||||
|
@ -65,6 +67,6 @@ class BuildLogs(object):
|
|||
try:
|
||||
fetched = self._redis.get(self._status_key(build_id))
|
||||
except redis.ConnectionError:
|
||||
return None
|
||||
raise BuildStatusRetrievalError('Cannot retrieve build status')
|
||||
|
||||
return json.loads(fetched) if fetched else None
|
||||
|
|
|
@ -1029,7 +1029,7 @@ def set_image_metadata(docker_image_id, namespace_name, repository_name,
|
|||
except Image.DoesNotExist:
|
||||
raise DataModelException('No image with specified id and repository')
|
||||
|
||||
fetched.storage.created = dateutil.parser.parse(created_date_str)
|
||||
fetched.storage.created = dateutil.parser.parse(created_date_str).replace(tzinfo=None)
|
||||
fetched.storage.comment = comment
|
||||
fetched.storage.command = command
|
||||
|
||||
|
|
Reference in a new issue