Skip to content

Commit

Permalink
remove record_id
Browse files Browse the repository at this point in the history
  • Loading branch information
Jin-Sun-tts committed Mar 19, 2024
1 parent 9831de4 commit 469870c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions app/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,11 @@ class HarvestError(Base):
harvest_job_id = db.Column(UUID(as_uuid=True),
db.ForeignKey('harvest_job.id'),
nullable=False)
harvest_record_id = db.Column(UUID(as_uuid=True),
db.ForeignKey('harvest_record.id'),
nullable=True)
harvest_record_id = db.Column(db.String)
# to-do
# harvest_record_id = db.Column(UUID(as_uuid=True),
# db.ForeignKey('harvest_record.id'),
# nullable=True)
date_created = db.Column(db.DateTime)
type = db.Column(db.String)
severity = db.Column(Enum('CRITICAL', 'ERROR', 'WARN', name='error_serverity'),
Expand Down
2 changes: 1 addition & 1 deletion harvester/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def __init__(self, msg, harvest_job_id, title):
"severity": self.severity,
"type": self.type,
"date_created": datetime.utcnow(),
"record_id": self.title,
"harvest_record_id": self.title # to-do
}

self.db_interface.add_harvest_error(error_data, self.harvest_job_id)
Expand Down

1 comment on commit 469870c

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage

Coverage Report
FileStmtsMissCoverMissing
harvester
   __init__.py50100% 
   ckan_utils.py4222 95%
   exceptions.py420100% 
   harvest.py4256565 85%
   logger_config.py10100% 
   utils.py3522 94%
TOTAL5506987% 

Tests Skipped Failures Errors Time
28 0 💤 0 ❌ 0 🔥 1.885s ⏱️

Please sign in to comment.