Skip to content
Snippets Groups Projects
Commit f8b06204 authored by Ramin Yaghoubzadeh's avatar Ramin Yaghoubzadeh
Browse files

Added RemoteServer timeout constant. Changed resolve unpack.

parent 44e6e389
No related branches found
No related tags found
No related merge requests found
......@@ -11,7 +11,6 @@
/// date of last release number increment
#define IPAACA_CPP_RELEASE_DATE "2012-04-13"
#ifdef IPAACA_DEBUG_MESSAGES
#define IPAACA_INFO(i) std::cout << __FILE__ << ":" << __LINE__ << ": " << __func__ << "() -- " << i << std::endl;
#define IPAACA_WARNING(i) std::cout << __FILE__ << ":" << __LINE__ << ": " << __func__ << "() -- WARNING: " << i << std::endl;
......@@ -24,12 +23,17 @@
#define IPAACA_TODO(i) ;
#endif
/// marking pure virtual functions for extra readability
#define _IPAACA_ABSTRACT_
/// value to return when reading nonexistant payload keys
#define IPAACA_PAYLOAD_DEFAULT_STRING_VALUE ""
// seconds until remote writes time out
#define IPAACA_REMOTE_SERVER_TIMEOUT 2.0
#include <iostream>
#include <boost/thread.hpp>
......@@ -193,6 +197,7 @@ class Buffer { //: public boost::enable_shared_from_this<Buffer> {//{{{
friend class CallbackIULinkUpdate;
friend class CallbackIUCommission;
protected:
//Lock _handler_lock;
std::string _uuid;
std::string _basename;
std::string _unique_name;
......
......@@ -880,7 +880,7 @@ void RemotePushIU::_modify_links(bool is_delta, const LinkMap& new_links, const
update->writer_name = _buffer->unique_name();
update->new_links = new_links;
update->links_to_remove = links_to_remove;
boost::shared_ptr<int> result = server->call<int>("updateLinks", update, 1); // TODO 1 sec
boost::shared_ptr<int> result = server->call<int>("updateLinks", update, IPAACA_REMOTE_SERVER_TIMEOUT); // TODO
if (*result == 0) {
throw IUUpdateFailedError();
} else {
......@@ -903,7 +903,7 @@ void RemotePushIU::_modify_payload(bool is_delta, const std::map<std::string, st
update->writer_name = _buffer->unique_name();
update->new_items = new_items;
update->keys_to_remove = keys_to_remove;
boost::shared_ptr<int> result = server->call<int>("updatePayload", update, 1); // TODO 1 sec
boost::shared_ptr<int> result = server->call<int>("updatePayload", update, IPAACA_REMOTE_SERVER_TIMEOUT); // TODO
if (*result == 0) {
throw IUUpdateFailedError();
} else {
......@@ -925,7 +925,7 @@ void RemotePushIU::commit()
update->set_uid(_uid);
update->set_revision(_revision);
update->set_writer_name(_buffer->unique_name());
boost::shared_ptr<int> result = server->call<int>("commit", update, 1); // TODO 1 sec
boost::shared_ptr<int> result = server->call<int>("commit", update, IPAACA_REMOTE_SERVER_TIMEOUT); // TODO
if (*result == 0) {
throw IUUpdateFailedError();
} else {
......
......@@ -23,7 +23,7 @@ for P in $PACKAGES; do
[ "$files" ] && cp -a ../$P/dist/scripts/* deps/scripts/
files=(../$P/dist/python/*.zip);
[ "$files" ] && for zipfile in ../$P/dist/python/*.zip; do
unzip -qq $zipfile -d deps/python
unzip -oqq $zipfile -d deps/python
done
done
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment