Skip to content

Commit

Permalink
chore: review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jmoreira-valory committed Apr 19, 2024
1 parent 5ae561c commit d288f54
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 15 deletions.
8 changes: 4 additions & 4 deletions packages/packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
"contract/valory/fpmm_deterministic_factory/0.1.0": "bafybeihi2pozsqbgu6mkepoyqqwqxc3o7ks47tx7vuf5hxfkbsyuskzqjq",
"contract/valory/wxdai/0.1.0": "bafybeidalocwbhmbto6ii6adldtpcughtdt6j3v4tv36utevjk2wrdyqie",
"contract/valory/fpmm/0.1.0": "bafybeiai2ruj27nnglvn7yc5atojyojo3fkmofw6wrjgz2ybps2uwdizx4",
"skill/valory/market_creation_manager_abci/0.1.0": "bafybeicdrivdfepjyswu6l6qiswizqgmqj6fxedholpk7x3nidjipoi6e4",
"skill/valory/market_maker_abci/0.1.0": "bafybeih3wjn5jqk32pkthz5sezl6kux7apay3n3wfzphfxrmja77hftct4",
"agent/valory/market_maker/0.1.0": "bafybeig6wpq2onzlkimxxmlvntbi4rso6h5za7srfdms44drapfd6mmree",
"service/valory/market_maker/0.1.0": "bafybeibkqywd5pbhlc6umktvclwslzfm35yrabrrkuye5x5yyasd6uzhou"
"skill/valory/market_creation_manager_abci/0.1.0": "bafybeicoymcfncfdjisnng56yu3hcyt6zbk7trpqontpjqjsk6owkwecyu",
"skill/valory/market_maker_abci/0.1.0": "bafybeibzabftqsyhihpv7ka6v6l4tjzhvzpijti2qwoyyl7ttrlfj3clp4",
"agent/valory/market_maker/0.1.0": "bafybeifdfqfrz6wdtxy2of6pazjwjxqfslyg5bosha27x3z47gu4caqove",
"service/valory/market_maker/0.1.0": "bafybeigviagkeq3deu6ihjvjt536lau55jz2uj5zwujx7tvwongqe3mx7a"
},
"third_party": {
"protocol/valory/contract_api/1.0.0": "bafybeidgu7o5llh26xp3u3ebq3yluull5lupiyeu6iooi2xyymdrgnzq5i",
Expand Down
4 changes: 2 additions & 2 deletions packages/valory/agents/market_maker/aea-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ protocols:
skills:
- valory/abstract_abci:0.1.0:bafybeibvz3hi25ktgdzm25kih25o5osml62zk4kzpgmzmyrem3hzo2vtnm
- valory/abstract_round_abci:0.1.0:bafybeic2emnylfmdtidobgdsxa4tgdelreeimtglqzrmic6cumhpsbfzhe
- valory/market_maker_abci:0.1.0:bafybeih3wjn5jqk32pkthz5sezl6kux7apay3n3wfzphfxrmja77hftct4
- valory/market_maker_abci:0.1.0:bafybeibzabftqsyhihpv7ka6v6l4tjzhvzpijti2qwoyyl7ttrlfj3clp4
- valory/registration_abci:0.1.0:bafybeibzduasg5pahk2d2glc36wlopg54ybwcdmjqbzozt2lmkp4reqsdu
- valory/market_creation_manager_abci:0.1.0:bafybeicdrivdfepjyswu6l6qiswizqgmqj6fxedholpk7x3nidjipoi6e4
- valory/market_creation_manager_abci:0.1.0:bafybeicoymcfncfdjisnng56yu3hcyt6zbk7trpqontpjqjsk6owkwecyu
- valory/reset_pause_abci:0.1.0:bafybeib3geaw3o35aigmb4dhplxrjlsef7hbdwrozu4akiunlgyiegshj4
- valory/termination_abci:0.1.0:bafybeifnfuy3svz5oz6kwglu35q6jn7ai3riqplyypskb7za5ejyvjmfza
- valory/transaction_settlement_abci:0.1.0:bafybeifhuemoavm6hf4vypg2sl7kng3iv4ipxgpk3itbh5hp73lworpuwq
Expand Down
2 changes: 1 addition & 1 deletion packages/valory/services/market_maker/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license: Apache-2.0
fingerprint:
README.md: bafybeibwz3af6326msp4h3kqehijvmyhaytvyfbo3o2npc2w4b6zrg6pfq
fingerprint_ignore_patterns: []
agent: valory/market_maker:0.1.0:bafybeig6wpq2onzlkimxxmlvntbi4rso6h5za7srfdms44drapfd6mmree
agent: valory/market_maker:0.1.0:bafybeifdfqfrz6wdtxy2of6pazjwjxqfslyg5bosha27x3z47gu4caqove
number_of_agents: 1
deployment:
agent:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2297,10 +2297,9 @@ def _eligible_questions_to_answer(
"""Determine the eligible questions to answer at this time"""
now = self.last_synced_timestamp
eligible_questions_id = []
answer_retry_intervals = self.params.answer_retry_intervals

self.context.logger.info(
f"Answer retry intervals: {self.params.answer_retry_intervals}"
)
self.context.logger.info(f"Answer retry intervals: {answer_retry_intervals}")

for question in unanswered_questions:
question_id = question["question"]["id"].lower()
Expand All @@ -2311,14 +2310,14 @@ def _eligible_questions_to_answer(
if question_id not in self.shared_state.questions_requested_mech:
self.shared_state.questions_requested_mech[question_id] = {
"question": question,
"retries": []
"retries": [],
}

retries = self.shared_state.questions_requested_mech[question_id]["retries"]
n_retries = len(retries)
time_since_last_retry = now - retries[-1] if retries else 0
retry_period = self.params.answer_retry_intervals[
min(n_retries, len(self.params.answer_retry_intervals) - 1)
retry_period = answer_retry_intervals[
min(n_retries, len(answer_retry_intervals) - 1)
]
if n_retries == 0 or time_since_last_retry > retry_period:
eligible_questions_id.append(question_id)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ aea_version: '>=1.0.0, <2.0.0'
fingerprint:
.gitignore: bafybeihdfdezgtr3s2lzq5y3oaitfrdy4u4pehionju2bdez35wcjgqx6y
__init__.py: bafybeibkyjt4covc4yhd22aw7kav45zozk3exdv344emt3lilln64soaxm
behaviours.py: bafybeigbem46e4zyuyozxn4gfdyltu2grq23iwjeya225ejzhx2si3nsqq
behaviours.py: bafybeibskfldhxwww3tsybkz47vkg3pfh7tcotvde5gnwyx3c6rq7htw7a
dialogues.py: bafybeicmaufkl7vdomnfciv7lw4536ssld7x4uemdapuhsyvfpd4ncibza
fsm_specification.yaml: bafybeicps5t2anm7fv35fwnw7oolaxxmpmjio6mdw4sc6rzpnsolph5xlm
handlers.py: bafybeietxjfli2i57kb7heoy772rcq2znusl36gg7jjj5g3pddw7egny3q
Expand Down
2 changes: 1 addition & 1 deletion packages/valory/skills/market_maker_abci/skill.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ skills:
- valory/abstract_round_abci:0.1.0:bafybeic2emnylfmdtidobgdsxa4tgdelreeimtglqzrmic6cumhpsbfzhe
- valory/registration_abci:0.1.0:bafybeibzduasg5pahk2d2glc36wlopg54ybwcdmjqbzozt2lmkp4reqsdu
- valory/reset_pause_abci:0.1.0:bafybeib3geaw3o35aigmb4dhplxrjlsef7hbdwrozu4akiunlgyiegshj4
- valory/market_creation_manager_abci:0.1.0:bafybeicdrivdfepjyswu6l6qiswizqgmqj6fxedholpk7x3nidjipoi6e4
- valory/market_creation_manager_abci:0.1.0:bafybeicoymcfncfdjisnng56yu3hcyt6zbk7trpqontpjqjsk6owkwecyu
- valory/termination_abci:0.1.0:bafybeifnfuy3svz5oz6kwglu35q6jn7ai3riqplyypskb7za5ejyvjmfza
- valory/transaction_settlement_abci:0.1.0:bafybeifhuemoavm6hf4vypg2sl7kng3iv4ipxgpk3itbh5hp73lworpuwq
- valory/mech_interact_abci:0.1.0:bafybeigilca6rfqu4qw7yhz5lnhzgymj5cabtusx5hjndt7w7kulkn7cga
Expand Down

0 comments on commit d288f54

Please sign in to comment.