Skip to content
Snippets Groups Projects
Commit cbeff3a0 authored by Sergey Yakubov's avatar Sergey Yakubov
Browse files

start work at python libs for producer

parent 695e10e0
No related branches found
No related tags found
No related merge requests found
Showing
with 12 additions and 31 deletions
......@@ -6,7 +6,7 @@
**Library:** Common library which get shared between the producer and receiver
- /producer/producer-api
- /producer/asapo-producer
**Library:** ProducerImpl library which can send data to the receiver
......
......@@ -77,7 +77,7 @@ public class PlanSpec {
new Artifact()
.name("Coverage-Producer")
.copyPattern("**/*")
.location("build/coverage-producer-api"),
.location("build/coverage-asapo-producer"),
new Artifact()
.name("Coverage-Worker")
.copyPattern("**/*")
......
......@@ -2,7 +2,7 @@ set(TARGET_NAME pipeline_inout)
set(SOURCE_FILES in_to_out.cpp)
add_executable(${TARGET_NAME} ${SOURCE_FILES})
target_link_libraries(${TARGET_NAME} asapo-worker producer-api)
target_link_libraries(${TARGET_NAME} asapo-worker asapo-producer)
#use expression generator to get rid of VS adding Debug/Release folders
set_target_properties(${TARGET_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY
......
......@@ -10,7 +10,7 @@ target_include_directories(${TARGET_NAME} PUBLIC include ${CMAKE_SOURCE_DIR}/com
GET_PROPERTY(ASAPO_COMMON_IO_LIBRARIES GLOBAL PROPERTY ASAPO_COMMON_IO_LIBRARIES)
target_link_libraries(${TARGET_NAME} ${ASAPO_COMMON_IO_LIBRARIES})
target_link_libraries(${TARGET_NAME} producer-api)
target_link_libraries(${TARGET_NAME} asapo-producer)
set_target_properties(${TARGET_NAME} PROPERTIES LINKER_LANGUAGE CXX)
set_target_properties(${TARGET_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY
......
......@@ -18,4 +18,4 @@ link_directories(@CMAKE_INSTALL_PREFIX@/lib)
add_executable(${TARGET_NAME} ${SOURCE_FILES})
target_include_directories(${TARGET_NAME} PUBLIC @CMAKE_INSTALL_PREFIX@/include)
target_link_libraries(${TARGET_NAME} producer-api ${CMAKE_THREAD_LIBS_INIT})
target_link_libraries(${TARGET_NAME} asapo-producer ${CMAKE_THREAD_LIBS_INIT})
add_subdirectory(api)
add_subdirectory(api/cpp)
add_subdirectory(api/python)
add_subdirectory(event_monitor_producer)
# cpp-producer
This is the producer implementation in c++
## Building this project
### Requirements
#### System
- Linux Kernel >= 4
#### Build Dependencies
- cmake4
##### Optional
- astyle
- doxygen
### How to build
- TODO
set(TARGET_NAME producer-api)
set(TARGET_NAME asapo-producer)
set(SOURCE_FILES
src/producer.cpp
src/producer_impl.cpp
......
......@@ -3,8 +3,9 @@
std::unique_ptr<asapo::Producer> asapo::Producer::Create(const std::string& endpoint, uint8_t n_processing_threads,
asapo::RequestHandlerType type, SourceCredentials source_cred, Error* err) {
if (n_processing_threads > kMaxProcessingThreads) {
*err = TextError("Too many processing threads: " + std::to_string(n_processing_threads));
if (n_processing_threads > kMaxProcessingThreads || n_processing_threads == 0) {
*err = TextError("Set number of processing threads > 0 and <= " + std::to_string(kMaxProcessingThreads));
return nullptr;
}
......
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