Skip to content
This repository has been archived by the owner on Jul 7, 2023. It is now read-only.

Commit

Permalink
fix bug with produce when multiple candid
Browse files Browse the repository at this point in the history
  • Loading branch information
dirodriguezm committed Dec 3, 2020
1 parent 455dc19 commit 10de022
Show file tree
Hide file tree
Showing 4 changed files with 1,238 additions and 0 deletions.
2 changes: 2 additions & 0 deletions features/step.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@ def produce(self, features, alert_data):
for oid, features_oid in features.iterrows():
features_oid.replace({np.nan: None}, inplace=True)
candid = alert_data.loc[oid].candid
if isinstance(candid, pd.Series):
candid = candid.iloc[-1]
features_dict = features_oid.to_dict()
out_message = {"features": features_dict, "oid": oid, "candid": candid}
self.producer.produce(out_message, key=oid)
Expand Down
Loading

0 comments on commit 10de022

Please sign in to comment.